import request from '@/utils/request'
import { getList } from '../table'

export default{
    
    /**
     * 讲师列表 分页 条件
     * @param {int} current 第几页
     * @param {int} size 每页多少条数据
     * @param {object} teacherQuery 条件
     * @returns 
     */
    getList(current,size,teacherQuery){
        return request({
            url:`/eduService/teacher/pageTeacher/${current}/${size}`,
            method:'post',
            data:teacherQuery
        })
    },

    /**
     * 添加讲师
     * @param {*} teacher 讲师信息 
     * @returns 
     */
    addTeacher(teacher){
        return request({
            url:`/eduService/teacher/addTeacher`,
            method:'post',
            data:teacher
        })
    },
    /**
     * 
     * @param {*} id 逻辑删除讲师信息
     * @returns 
     */
    deleteTeacher(id){
        return request({
            url:`/eduService/teacher/${id}`,
            method:'DELETE',
        })
    },
    /**
     * 
     * @param {*} id 查询id讲师信息
     * @returns 
     */
    getTeacher(id){
        return request({
            url:`/eduService/teacher/getTeacher/${id}`,
            method:'get'
        })
    },
    /**
     * 
     * @param {*} teacher 修改讲师信息
     * @returns 
     */
    updateTeacher(teacher){
        return request({
            url:`/eduService/teacher/updateTeacher`,
            method:'post',
            data:teacher
        })
    },
    /**
     * 
     * @returns 查询所有讲师信息
     */
    get_all_teacher(){
        return request({
            url:`/eduService/teacher/findAll`,
            method:'get'
        })
    }

}

